import axios from 'axios';

/**
 * 导出防伪电子印章
 * @param antiFakeForm
 * @returns {AxiosPromise}
 */
export const exportAntiFakeSealApi = (antiFakeForm) => axios({
    url: '/exportAntiFakeSeal',
    method: 'post',
    data: antiFakeForm
})

/**
 * 校验防伪电子印章
 * @param antiFakeForm
 * @returns {AxiosPromise}
 */
export const verifySealApi = (antiFakeForm) => axios({
    url: '/verifySeal',
    method: 'post',
    data: antiFakeForm
})

/**
 * 获取印章使用详情
 * @param current 当前索引
 * @param pageSize 分页大小
 * @param sealId 印章id
 * @param purpose 用途
 * @return {AxiosPromise}
 */
export const getAntiFakeSealListByTemplateIdApi = (current,pageSize,sealId,purpose) => axios({
    url: '/getAntiFakeSealListByTemplateId',
    method: 'get',
    params: {
        current,
        pageSize,
        sealId,
        purpose
    }
})

/**
 * 根据模板印章id和使用用途获取使用数量
 * @param sealId
 * @param purpose
 * @return {AxiosPromise}
 */
export const getAntiFakeSealNumByTemplateIdApi = (sealId,purpose) => axios({
    url: '/getAntiFakeSealNumByTemplateId',
    method: 'get',
    params: {
        sealId,
        purpose
    }
})

/**
 * 根据签署人获取签署信息
 * @return {AxiosPromise}
 */
export const getSignDetailByUserApi = (current,pageSize,antiFakeUser,purpose) => axios({
    url: '/getSignDetailByUser',
    method: 'get',
    params: {
        current,
        pageSize,
        antiFakeUser,
        purpose
    }
})

/**
 * 根据签署人获取签署信息数量
 * @param antiFakeUser 用户
 * @param purpose 用途
 * @return
 */
export const getSignDetailNumByUserApi = (antiFakeUser,purpose) => axios({
    url: '/getSignDetailNumByUser',
    method: 'get',
    params: {
        antiFakeUser,
        purpose
    }
})

/**
 * 根据id获取电子印章使用信息
 * @param antiFakeSealId
 * @param purpose
 * @returns {AxiosPromise}
 */
export const getAntiFakeDetailApi = (antiFakeSealId,purpose) => axios({
    url: '/getAntiFakeDetail',
    method: 'get',
    params: {
        antiFakeSealId,
        purpose
    }
})
